using System.ComponentModel.DataAnnotations;

namespace NotifyCenter.Projects.Dtos;

public class NotificationRuleRequest
{
    [Required]
    [MaxLength(255)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(2000)]
    public string? Description { get; set; }

    [Required]
    public string Type { get; set; }

    [Required]
    [MaxLength(2000)]
    public string ConfigurationJson { get; set; } = "{}";

    public bool EnableWebhook { get; set; }

    [MaxLength(1024)]
    public string? WebhookUrl { get; set; }

    [MaxLength(255)]
    public string? WebhookSecret { get; set; }

    [Range(1, 10)]
    public int? MaxRetryTimes { get; set; }
}
